import jwt from 'jsonwebtoken';
import {secure} from '@/config'
export const getUserInfo = ()=>{
    const token = window.sessionStorage.getItem('token')
    // 解密   token,secure 
    let userinfo = jwt.decode(token,secure)   
    console.log(userinfo,'userinfo');
    return userinfo;
}
export const isLogin =()=>{
    return !!getUserInfo()
}